import request from '@/utils/request'
/**
 * 查询企业的部门列表
 * @returns
 */
export const reqGetDepartments = () => request({
  method: 'get',
  url: '/company/department'
})
export const reqDelDepartments = (id) => request({
  method: 'DELETE',
  url: `/company/department/${id}`
})

export const reqAddDepartments = (data) => request({
  method: 'post',
  url: '/company/department',
  data
})
/**
 * 根据id查询部门详情
 * @param {*} id 部门id
 * @returns
 */
export const reqGetDepartDetail = (id) => request({
  method: 'get',
  url: `/company/department/${id}`
})

export const reqUpdateDepartments = (data) => request({
  method: 'put',
  url: `/company/department/${data.id}`,
  data
})
